home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / shells / bashsrc.zoo / hash.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-05  |  826 b   |  27 lines

  1. /* hash.h -- the data structures used in hashing in Gsh. */
  2.  
  3. typedef struct bucket_contents {
  4.   struct bucket_contents *next;    /* The next item whose key hashes to this bucket. */
  5.   char *key;            /* What we look up. */
  6.   char *data;            /* What we really want. */
  7.   int times_found;        /* Number of times this item has been looked up. */
  8. } BUCKET_CONTENTS;
  9.  
  10. typedef struct hash_table {
  11.   BUCKET_CONTENTS **bucket_array;    /* Where the data is kept. */
  12.   int nbuckets;            /* How many buckets does this table have. */
  13.   int nentries;            /* How many entries does this table have. */
  14. } HASH_TABLE;
  15.  
  16. extern BUCKET_CONTENTS
  17.   *find_hash_item (), *remove_hash_item (), *add_hash_item (),
  18.   *get_hash_bucket ();
  19.  
  20. extern int hash_string ();
  21. extern HASH_TABLE *make_hash_table ();
  22.  
  23.  
  24. #ifndef NULL
  25. #define NULL 0x0
  26. #endif
  27.